﻿using Microsoft.Practices.Unity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moop.Common;
using Moop.DataLayer.Olap.Service;

namespace Moop.DataLayer.Olap.Service.Test
{
    [TestClass]
    public class OlapMetaDataServiceUnitTests
    {
        public string CONN_STRING   = @"Data Source=.;Catalog=Adventure Works DW 2008R2;";
        public string DATABASE_NAME = @"Adventure Works DW 2008R2";

        public OlapMetaDataServiceUnitTests()
        {
            TypeContainer.Register();
        }   

        [TestMethod]
        public void OlapMetaDataServiceTest()
        {            
            IOlapMetaDataService olapMetaDataService = TypeContainer.Instance.Resolve<IOlapMetaDataService>();
            olapMetaDataService.ConnectionString = CONN_STRING;
            olapMetaDataService.Init();

            olapMetaDataService.DatabaseName = DATABASE_NAME;            
            IOlapDatabase dbase = olapMetaDataService.Populate();            
        }
    }
}
